package entities;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table(name="raspunsuri")

@NamedQueries({
	@NamedQuery(name="getRaspunsuriByIntrebareId", query="SELECT r FROM Raspunsuri r WHERE r.intrebari=:ch_idParam")
})

public class Raspunsuri implements Serializable{

	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	private int id;
	
	private String raspuns;
	
	@ManyToOne
	@JoinColumn(name = "id_intrebare")
	private Intrebari intrebari;

	
	public Raspunsuri(){
		super();
	}
	
	public Raspunsuri(int id, Intrebari intrebari, String raspuns){
		this.id = id;
		this.intrebari = intrebari;
		this.raspuns = raspuns;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
	public String getRaspuns() {
		return raspuns;
	}

	public void setRaspuns(String raspuns) {
		this.raspuns = raspuns;
	}
	/*
	public int getId_intrebare() {
		return id_intrebare;
	}

	public void setId_intrebare(int id_intrebare) {
		this.id_intrebare = id_intrebare;
	}
	*/

	public Intrebari getIntrebari() {
		return intrebari;
	}

	public void setIntrebari(Intrebari intrebari) {
		this.intrebari = intrebari;
	}

}
